/**
 * 
 */
package ru.ksu.ktk.diploma.sdi.util;

import java.util.Map;

import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;

/**
 * @author RinaT
 * @date 06.03.2009
 */
public class FacesUtils {

    public static HttpServletRequest getRequest() {
        return (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
    }

    public static String getRequestParameter(String parameterName) {
        ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
        Map<String, String> parameterMap = context.getRequestParameterMap();
        return parameterMap.get(parameterName);
    }

    private FacesUtils() {
    }

}